Socket
Socket
Sign inDemoInstall

@zkochan/cmd-shim

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zkochan/cmd-shim

Used in pnpm for command line application support


Version published
Weekly downloads
387K
decreased by-12.69%
Maintainers
1
Weekly downloads
 
Created

What is @zkochan/cmd-shim?

@zkochan/cmd-shim is an npm package that allows you to create command-line shims. These shims are small scripts that act as a bridge between the command line and a Node.js script, making it easier to run Node.js scripts as if they were native command-line applications.

What are @zkochan/cmd-shim's main functionalities?

Creating a Command Shim

This feature allows you to create a command shim that links a source Node.js script to a target command. When the target command is executed, it will run the source script. This is useful for making Node.js scripts easily executable from the command line.

const cmdShim = require('@zkochan/cmd-shim');

cmdShim('path/to/source.js', 'path/to/target', (err) => {
  if (err) throw err;
  console.log('Command shim created successfully!');
});

Creating a Command Shim with Options

This feature allows you to create a command shim with additional options. For example, the `createCmdFile` option can be set to true to create a .cmd file on Windows. This provides more control over the behavior of the created shim.

const cmdShim = require('@zkochan/cmd-shim');

const options = { createCmdFile: true };
cmdShim('path/to/source.js', 'path/to/target', options, (err) => {
  if (err) throw err;
  console.log('Command shim with options created successfully!');
});

Other packages similar to @zkochan/cmd-shim

FAQs

Package last updated on 26 Jan 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc